/*
 * Copyright 2011 Google Inc. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.pps.gl.client;

import java.util.ArrayList;
import java.util.HashMap;

import org.pps.gl.client.data.MessageInfo;
import org.pps.gl.client.data.NewsInfo;
import org.pps.gl.client.data.UserInfo;
import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;

@RemoteServiceRelativePath("GetInfoService")
public interface GetInfoService extends RemoteService {
	/**
	 * Utility class for simplifying access to the instance of async service.
	 */
	public static class Util {
		private static GetInfoServiceAsync instance;

		public static GetInfoServiceAsync getInstance() {
			if (instance == null) {
				instance = GWT.create(GetInfoService.class);
			}
			return instance;
		}
	}

	UserInfo getUserIdentite(String email);

	HashMap<UserInfo, Integer> doSearch(String mail, String email, String nomprenom,
			String societe, String ecole);

	boolean majIdentite(String email, String firstName, String lastName,
			String statut, String sexe, String dateN);

	LoginInfo getUserLoginInfo(LoginInfo currentUser);

	boolean addEtude(String emailUser, String debut, String fin,
			String nomEcole, String specialite);

	boolean createContactDemande(String emailDemandeur, String emailReceiver);

	boolean confirmContactDemande(String emailDemandeur, String emailReceiver);

	boolean addExperience(String emailAddress, String debut, String fin,
			String nomEntreprise, String direction, String poste,
			String description, String domaine);

	ArrayList<NewsInfo> getNews(String userMail);
	
	HashMap<UserInfo, Integer> doSuggestion(String email);
	
	boolean addMessage(String destinataire, String expediteur, String message, String titre);
	
	ArrayList<MessageInfo> getMessage(String userMail);
		
	ArrayList<Integer> getNbrContactSecond(String user);
	
	boolean deleteExperienceUser(long idExperience);
	
	boolean deleteEtude(long idEtude);
	
	boolean deleteMessage(long idMessage);
	
	boolean deleteUser(String user_email);
	
	String getIdentite(String email);
}
